//
//  socialCenter.h
//  share
//
//  Created by Jacob on 8/4/14.
//  Copyright (c) 2014 com.haomee. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "PlatformUserMoidel.h"

typedef enum
{
    platformWeiXin,
    platformWXfriends,
    platformSina,
    platformQQ,
    platformQzone,
    platformFaceBook
    
}platformName;
@protocol socialDateSource <NSObject>



#pragma mark - Bind/unBind

- (void)getUSerInfoSuccess:(void (^)(PlatformUserMoidel *model))success
              error:(void (^)(NSString *message))errorBlock;


#pragma mark - other

- (BOOL)openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;

-(void)shareImage:(UIImage *)image title:(NSString *)title description:(NSString *)description andImageUrl:(NSString *)ImgUrl andurl:(NSString *)url andCompletionBlock:(void (^)(BOOL isSuccess))block;

-(void)getFriendships:(void(^)(BOOL isSuccess,NSArray *array))block;
@end

@interface SocialCenter : NSObject
+(instancetype)sharedInstance;

+ (id<socialDateSource>)clientWithPlatForm:(platformName )platFormName;

+(void)loginindex:(int )index Success:(void (^)(PlatformUserMoidel *model))success
            error:(void (^)(NSString *message))errorBlock;
+(void)shareToPlayformWithIndex:(int)index andURL:(NSString*)url andWithTitle:(NSString*)title andWithMessage:(NSString*)info andImageURL:(NSString*)imageURL andWithLocalImage:(UIImage*)localImage andBlock:(void (^)(BOOL isSuccess))shareBlock;
+(void)getFriendshipsAtIndex:(int )index completionBlock:(void(^)(BOOL isSuccess,NSArray *array))block;


/*!
 SSO handle
 */
+ (BOOL)openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;


@end
